home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / utility / 95 / pascal / prog3.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-01-15  |  2.0 KB  |  50 lines

  1. PROGRAM PROG3;
  2. {$U+          Copyright (C), 1985 by Lyle Faurot.  All rights reserved.
  3.  
  4.    New Topics: Comments
  5.                Output with the Write and WriteLn statements
  6.                Compiler directive - $U+
  7.  
  8.    Note that this block of comments, extending over several lines
  9.    is int WriteLn('*                                 *');  {the beginning of this   }
  10.   WriteLn('* * * * * * * * * * * * * * * * * *');  {program would include   }
  11.   {    some of the non-comment statements, making them ineffective.         }
  12.  
  13.   {The fact that statements can be temporarily killed by commenting them
  14.    out illustrates the usefulness of a second type of comment delimiter.
  15.  
  16.    Try killing several of the WriteLn statements above by inserting
  17.    (*  to the left of the first statement to be killed and
  18.    *)  to the left of the statement AFTER the last statement to be killed.
  19.        Run the program to see the results.
  20.   }
  21.  
  22.   WriteLn;
  23.   Write  ('Check carefully when ');
  24.   Write  ('you run this program. ');
  25.   Write  ('How many lines ');
  26.   WriteLn('are printed');
  27.   WriteLn('by this last set of Write and WriteLn statements?');
  28.  
  29. E srdi imnsloqarhw sssssssssssssssssssssssssssssssssssssssss;  {the beginning of this   }
  30.   WriteLn('* * * * * * * * * * * * * * * * * *');  {program would include   }
  31.   {    some of the non-comment statements, making them ineffective.         }
  32.  
  33.   {The fact that statements can be temporarily killed by commenting them
  34.    out illustrates the usefulness of a second type of comment delimiter.
  35.  
  36.    Try killing several of the WriteLn statements above by inserting
  37.    (*  to the left of the first statement to be killed and
  38.    *)  to the left of the statement AFTER the last statement to be killed.
  39.        Run the program to see the results.
  40.   }
  41.  
  42.   WriteLn;
  43.   Write  ('Check carefully when ');
  44.   Write  ('you run this program. ');
  45.   Write  ('How many lines ');
  46.   WriteLn('are printed');
  47.   WriteLn('by this last set of Write and WriteLn statements?');
  48.  
  49. END. {PRG3}
  50.